package com.cesgroup.zw.spring.boot.library.echarts.graph.bubble;

import com.cesgroup.zw.spring.boot.echarts.component.series.Graph;
import com.cesgroup.zw.spring.boot.echarts.enums.Layout;
import com.cesgroup.zw.spring.boot.echarts.model.series.Force;
import com.cesgroup.zw.spring.boot.echarts.model.style.LabelStyle;

/**
 * @author ytj
 * @date 2019/7/5 10:12
 */
@SuppressWarnings("serial")
public class BubbleGraphSeries extends Graph {
    public BubbleGraphSeries(BubbleGraphParam param){
        this.setLayout(Layout.force);
        this.setForce(new Force(){{
            this.setRepulsion(500);
            this.setEdgeLength(10);
        }});
        this.setRoam(true);
        this.setLabel(new LabelStyle(){{
            this.setShow(true);
        }});
        this.setData(param.getDataset());
    }
}
